#include "stdlib.h"
#include "stdio.h"
#include "string.h"

//char *p = "abcd1111abcd222abcd3333" 请你找出字符串abcd出现的次数

//1个入口多个出口

/*
#include <string.h>

char *strstr(const char *haystack, const char *needle);
DESCRIPTION
    The strstr() function locates the first occurrence of the null-terminated
    string needle in the null-terminated string haystack.

RETURN VALUES
     If needle is an empty string, haystack is returned; if needle occurs
     nowhere in haystack, NULL is returned; otherwise a pointer to the first
     character of the first occurrence of needle is returned.
*/

void main()
{
	char *str1 = "Borland International", *str2 = "nation", *ptr;
	ptr = strstr(str1, str2);
	
	if (ptr == NULL)
	{
		return;
	}
	printf("The substring is: %s\n", ptr);
	
}




